package com.danciyixue.boot.dcyx.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 用户每日时间记录表单对象
 *
 * @author youlaitech
 * @since 2025-06-28 10:26
 */
@Getter
@Setter
@Schema(description = "用户每日时间记录表单对象")
public class DailyTimeRecordsForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "时间记录ID")
    private Long id;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime recordDate;

    @Schema(description = "在线时间")
    @NotNull(message = "在线时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime onlineTime;

    @Schema(description = "有效时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime effectiveTime;

    @Schema(description = "有效占比")
    @Size(max=16, message="有效占比长度不能超过16个字符")
    private String efficiency;

    @Schema(description = "在线时间秒数")
    private Integer onlineSeconds;

    @Schema(description = "有效时间秒数")
    private Integer effectiveSeconds;


}
